package com.talent.service.iot.mqtt.model.entity;

import java.util.Objects;

/**
 * @ClassName：TlTopic
 * @Author: hszhou
 * @Date: 2024/11/25 18:33
 * @Description: 主题类
 */
public class TlTopic {

    private String name;

    private int qos;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getQos() {
        return qos;
    }

    public void setQos(int qos) {
        this.qos = qos;
    }

    @Override
    public String toString() {
        return "TlTopic{" +
                "name='" + name + '\'' +
                ", qos=" + qos +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TlTopic tlTopic = (TlTopic) o;
        return qos == tlTopic.qos && Objects.equals(name, tlTopic.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, qos);
    }
}

